package com.example.backend.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin //允许跨域（域名、端口号都可以不一样）
@RestController
public class controllerDemo {

    //登录请求的接口
    //localhost:8080/login 或者 127.0.0.1：8080/login
    @RequestMapping("/login")
    public String login() {
        System.out.println("接收到请求");
        return "login success";
    }
}
